package com.yida.gwj.scene.expend.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yida.common.core.utils.DateUtils;
import com.yida.gwj.scene.expend.domain.GwjSceneExpendBusiness;
import com.yida.gwj.scene.expend.mapper.GwjSceneExpendBusinessMapper;
import com.yida.gwj.scene.expend.service.IGwjSceneExpendBusinessService;

/**
 * 坑爹支出老业务业务信息Service业务层处理
 * 
 * @author hmh
 * @date 2023-08-14
 */
@Service
public class GwjSceneExpendBusinessServiceImpl implements IGwjSceneExpendBusinessService {
    @Autowired
    private GwjSceneExpendBusinessMapper gwjSceneExpendBusinessMapper;

    /**
     * 查询坑爹支出老业务业务信息
     * 
     * @param bizId 坑爹支出老业务业务信息主键
     * @return 坑爹支出老业务业务信息
     */
    @Override
    public GwjSceneExpendBusiness selectGwjSceneExpendBusinessByBizId(Long bizId) {
        return gwjSceneExpendBusinessMapper.selectGwjSceneExpendBusinessByBizId(bizId);
    }

    /**
     * 查询坑爹支出老业务业务信息列表
     * 
     * @param gwjSceneExpendBusiness 坑爹支出老业务业务信息
     * @return 坑爹支出老业务业务信息
     */
    @Override
    public List<GwjSceneExpendBusiness> selectGwjSceneExpendBusinessList(GwjSceneExpendBusiness gwjSceneExpendBusiness) {
        return gwjSceneExpendBusinessMapper.selectGwjSceneExpendBusinessList(gwjSceneExpendBusiness);
    }

    /**
     * 新增坑爹支出老业务业务信息
     * 
     * @param gwjSceneExpendBusiness 坑爹支出老业务业务信息
     * @return 结果
     */
    @Override
    public int insertGwjSceneExpendBusiness(GwjSceneExpendBusiness gwjSceneExpendBusiness) {
        gwjSceneExpendBusiness.setCreateTime(DateUtils.getNowDate());
        return gwjSceneExpendBusinessMapper.insertGwjSceneExpendBusiness(gwjSceneExpendBusiness);
    }

    /**
     * 修改坑爹支出老业务业务信息
     * 
     * @param gwjSceneExpendBusiness 坑爹支出老业务业务信息
     * @return 结果
     */
    @Override
    public int updateGwjSceneExpendBusiness(GwjSceneExpendBusiness gwjSceneExpendBusiness) {
        gwjSceneExpendBusiness.setUpdateTime(DateUtils.getNowDate());
        return gwjSceneExpendBusinessMapper.updateGwjSceneExpendBusiness(gwjSceneExpendBusiness);
    }

    /**
     * 根据业务ID和地址ID修改业务信息
     * 
     * @param gwjSceneExpendBusiness 坑爹支出老业务业务信息
     * @return 结果
     */
    @Override
    public int updateGwjSceneExpendBusinessByBizIdAndAreaId(GwjSceneExpendBusiness gwjSceneExpendBusiness) {
        gwjSceneExpendBusiness.setUpdateTime(DateUtils.getNowDate());
        return gwjSceneExpendBusinessMapper.updateGwjSceneExpendBusinessByBizIdAndAreaId(gwjSceneExpendBusiness);
    }

    /**
     * 批量删除坑爹支出老业务业务信息
     * 
     * @param bizIds 需要删除的坑爹支出老业务业务信息主键
     * @return 结果
     */
    @Override
    public int deleteGwjSceneExpendBusinessByBizIds(Long[] bizIds) {
        return gwjSceneExpendBusinessMapper.deleteGwjSceneExpendBusinessByBizIds(bizIds);
    }

    /**
     * 删除坑爹支出老业务业务信息信息
     * 
     * @param bizId 坑爹支出老业务业务信息主键
     * @return 结果
     */
    @Override
    public int deleteGwjSceneExpendBusinessByBizId(Long bizId) {
        return gwjSceneExpendBusinessMapper.deleteGwjSceneExpendBusinessByBizId(bizId);
    }

}
